#ifndef TIMER_H
#define TIMER_H

struct HighPerformanceTimer
{

	double m_LogicFrameTime; // the time length of a logicFrame, measured in units of the HPT. Divide this by the frequency to get the amount of logic frames a second   		 
	
	__int64 m_Frequency;     // gives the resolution of the computer's high performance timer		
	__int64 m_Time0;         // time0 and time1 form a delta of time in HPT units.
	__int64 m_Time1; 

	void InitTimer(unsigned int targetLogicFps); // targetLogicFPS is the amount of logic frames per a second
	void UpdateTime0(); // this function gets the current time in HPT units and stores it in m_Time0.
	void UpdateTime1(); // this function gets the current time in HPT units and stores it in m_Time1.

	__int64 DeltaTime() const { return m_Time1 - m_Time0; }// the difference between time1 and time0
};

#endif